package com.rlz.framemm.mode.chain

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.fragment.app.DialogFragment
import com.rlz.framemm.R

/**
 * Created by RLZ
 * on 2021/10/21
 *
 */
class ThreeDialog : DialogFragment() {

    private var mConfirm: OnConfirm? = null

    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        return inflater.inflate(R.layout.dialog_three, null)
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        view.findViewById<TextView>(R.id.three).setOnClickListener {
            mConfirm.let { it?.onConfirm(this) }
        }

    }

    fun setOnClick(confirm: OnConfirm) {
        mConfirm = confirm
    }
}